$(function(){
	$(".theme-center .groups li").hover(function(){if(!$(this).hasClass("on"))$(this).addClass("hover");},function(){$(this).removeClass("hover");});
});


function setLink(e)
{
	var $e = $(e).parent().parent();
	var id = $e.attr("id").substr(22);
	var sNew = $e.hasClass("new")?"1":"0";

	popup('./?action=system.menu.set_link&id='+id+"&new="+sNew,480,320);
}

function setLinkCallback(id, sURL)
{
	
}


function popup(url, iWidth, iHeight)
{
	var iWindowsWidth  = $(window).width();
	var iWindowsHeight = $(window).height();
	
	var iLeft = (iWindowsWidth-iWidth)>>1;
	var iTop = (iWindowsHeight-iHeight)>>1;

	var sWindowName = "popwindow-"+Math.round(Math.random()*9999);
	
	window.open(url, sWindowName, 'width='+iWidth+',height='+iHeight+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,location=no,status=no,scrollbars=auto');
	
	return sWindowName;	
}